package view.contacto;

import java.awt.EventQueue;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

import view.alumnos.ConsultaAlumno;

public class SeleccionarAlumno extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					SeleccionarAlumno frame = new SeleccionarAlumno();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public SeleccionarAlumno() {
		setIconImage(Toolkit.getDefaultToolkit().getImage(SeleccionarAlumno.class.getResource("/Icon_/User group.gif")));
		setTitle("Alumnos");
		setResizable(false);
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 244, 185);
		this.setLocationRelativeTo(null);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);

		JButton btnGenerarNuevoAlumno = new JButton(" Generar nuevo alumno");
		btnGenerarNuevoAlumno.setIcon(new ImageIcon(SeleccionarAlumno.class.getResource("/Icon_/plus_16.png")));
		btnGenerarNuevoAlumno.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				// TODO VERIFICAR
				CrearContacto newContacto = new CrearContacto();
				newContacto.setNuevo(true);
				newContacto.setVisible(true);
			}
		});
		btnGenerarNuevoAlumno.setBounds(12, 30, 210, 35);
		contentPane.add(btnGenerarNuevoAlumno);

		JButton btnBuscarAlumnoExistente = new JButton(" Buscar alumno existente");
		btnBuscarAlumnoExistente.setIcon(new ImageIcon(SeleccionarAlumno.class.getResource("/Icon_/Find_16.png")));
		btnBuscarAlumnoExistente.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
//				ConsultaAlumno busqueda = new ConsultaAlumno();
			}
		});
		btnBuscarAlumnoExistente.setBounds(12, 90, 210, 35);
		contentPane.add(btnBuscarAlumnoExistente);
	}

}
